﻿using UnityEngine;
using System.Collections;

public class Model : ZT_Object
{
    public override void Update()
    {

    }
    public override void UpdateMS()
    {

    }
    public override bool Init()
    {
        return true;
    }

    public bool visible = true;
    public View view = null;

}



public class ChatInGame : Model
{
    public override void Update()
    {
        base.Update();


    }
    public override void OnEvent(int type, object userData)
    {
        if (type == Event.ID_CHAT_BTN_send)
        {
            string str = "cmd:chat:"+ BallsMgr.ins.GetSelfBalls().no.ToString() + ":";
            str += userData as string;
            BattleApp.ins.AddSendMsg(str);
        }
    }


    public override bool Init()
    {
        base.Init();

        EventDispatcher.ins.AddEventListener(this, Event.ID_CHAT_BTN_send);

        return true;
    }

}